package cn.yl.conSumerHystrix.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "provider-hystrix",fallbackFactory = ProviderHystrixServiceFactory.class) // 参数 serviceId
//@FeignClient(value = "provider-hystrix",fallback = ProviderHystrixService.class) // 参数 serviceId
public interface ProviderService {
    @GetMapping("/provider/hystrix/ok")
    String getHystrixOK();

    @GetMapping("/provider/hystrix/timeout")
    String providerHystrixTimeOut();

    @GetMapping("/provider/hystrix/order/{id}")
    public String providerOrder(@PathVariable Long id);
}
